System and method for light field correction of colored surfaces in an image

ABSTRACT

A computer-implemented method for correcting a makeup or skin effect to be rendered on a surface region of an image of a portion of a body of a person. The method and system correcting the makeup or skin effect by accounting for image-specific light field parameters, such as a light profile estimate and minimum light field estimation, and rendering the corrected the makeup or skin effect on the image to generate a corrected image.

FIELD

The present subject matter relates to a system and method for correctinga makeup or skin effect to be rendered on a surface region of an imageof a portion of a body of a person.

BACKGROUND

The importance of properly being able to see the accurate color ofmakeup in multiple lighting conditions is a crucial aspect in a beautyroutine. While makeup may look great in the artificial light of abathroom, under natural light a person may discover that theirfoundation is too dark and the shade of lipstick does not flatter theirskin tone. These errors that could have been prevented by allowing aperson to try on makeup in a digital image, where that makeup has beencorrected for the lighting environment of the image.

For example, while the color of the red lipstick may look deep and mutedin a bedroom with warm lighting, when walking outside the color changesto vibrant and bright. Another example is the color of lipstick a womanwants to wear has to match the color of the dress that is being worn.Being able to see what the color will look like in multiple sets oflighting makes it easier for a person to pick a shade that will flattertheir skin tone in all lightings, but also ensures the person has spenttheir time and money wisely.

The same color under different lighting conditions can render verydifferently. Furthermore, the same chemical texture (which has aspecific chemical composition and texture/finish) will reflect lightdifferently under different lighting situations.

U.S. Pat. No. 9,495,582 entitled “Digital Makeup” and published/issuedNov. 15, 2016 discloses a system that utilizes a combination oflow-pass, band-pass, and high-pass filters to de-noise a facial image.However, U.S. Pat. No. 9,495,582 does not disclose any method for thesimulation of color layers on an image, preserving the texture of theunderlying surface on which a color is simulated, or a model for thedynamic adjustment of a coloring layer in order to simulate a realisticcolor under different lighting conditions.

U.S. Pat. No. 9,547,883 entitled “Systems And Methods For DewarpingImages” and published/issued Jan. 17, 2017 discloses a system fordewarping image distortions caused by wide angle lenses. U.S. Pat. No.9,547,883 does not disclose any method for the simulation of colorlayers on an image, preserving the texture of the underlying surface onwhich a color is simulated, or a model for the dynamic adjustment of acoloring layer in order to simulate a realistic color under differentlighting conditions.

U.S. Pat. No. 9,542,599 entitled “Image Processing Device And ImageProcessing Method” and published/issued Jan. 10, 2017 discloses a systemfor the removal of halations around a pupil in a digital photo. U.S.Pat. No. 9,542,599 does not disclose any method for the simulation of amakeup color layer on an image, preserving the texture of the underlyingsurface on which a color is simulated, or a model for the dynamicadjustment of a coloring layer in order to simulate a realistic colorunder different lighting conditions.

U.S. Pat. No. 9,449,412 entitled “Adaptive, Calibrated Simulation OfCosmetic Products On Consumer Devices” and published/issued Sep. 20,2016 discloses a system for the simulation of cosmetic products onimages. U.S. Pat. No. 9,449,412 does not disclose a non-linearlight-field based transformation of the light value, nor does itdisclose the estimation of the minimum light pixels which are essentialfor the light value transformation. Finally, U.S. Pat. No. 9,449,412discloses only pixel-wise adjustments, but not region based adjustmentsas disclosed in this document.

U.S. Pat. No. 9,460,462 entitled “Monetization Using Video-BasedSimulation Of Cosmetic Products” and published/issued Oct. 4, 2016discloses a system for vending makeup products. U.S. Pat. No. 9,460,462does not disclose any method for preserving the texture of theunderlying surface on which a color is simulated, or a model for thedynamic adjustment of a coloring layer in order to simulate a realisticcolor under different lighting conditions.

SUMMARY

In accordance with the present disclosure, provided is a system andmethod for correcting a makeup or color effect to be rendered on asurface region of an image of a person which accounts for the lightingenvironment of the image and enables a layer of color to be renderedaccurately in different lighting conditions (e.g. low-light, highintensity light, etc.).

As a corollary, adjusting the rendering of the color layer based onlight field parameters can help users determine which shade of makeupwill closely match in all sets of lighting without having to buy andsample multiple shades which can become costly and unrealistic.

Disclosed is a method for correcting a makeup or skin effect to berendered on a surface region of an image of a portion of a body of aperson; calculating a light intensity estimate of the image as anaverage color of pixels in a first region of the image; calculating aminimum light field estimate of the image as the minimum color of pixelsin a second region of the image; receiving visual rendering parametersof the makeup or skin effect; correcting the visual rendering parametersof the makeup or skin effect through a non-linear transformationaccounting for the light intensity estimate and the minimum light fieldestimate to generate a light field corrected makeup or skin effect;rendering the light field corrected makeup or skin effect on the surfaceregion to generate a corrected image; and providing the corrected imagefor display.

The portion of a body of a person may be any portion of the body, suchas a face, hair or skin. The exemplary embodiment of the methoddisclosed herein is specific to a face, however it is envisioned thatthe method may be applied to any body part.

The method may comprise receiving a video frame as the image.

The first region of the image may comprise a face region of the person.

The second region of the image may comprise an eye region of the person.

There is provided a computer system comprising at least one processorand a memory storing instructions and data, which when executed by theprocessor, cause the computer system to perform at least one of themethods described. Also provided is a non-transitory computer readablemedium storing instructions that, when executed by a computer, cause thecomputer to carry at least one of the methods described.

BRIEF DESCRIPTION OF THE DRAWINGS

Exemplary embodiments of the subject matter will now be described inconjunction with the following drawings, by way of example only, inwhich:

FIG. 1 is a flow chart showing a method for light field correction ofcolored surfaces in an image as a sequence of steps with inputs inaccordance with an embodiment; and

FIG. 2 is a flow chart showing in greater detail the method shown inFIG. 1, in accordance with an embodiment.

DETAILED DESCRIPTION

As further described below with reference to FIGS. 1 and 2, a system andcomputer-implemented method for light field correction of coloredsurfaces in an image is provided. Such a system and method may be usefulto correct a makeup or skin effect to be rendered on a surface region ofan image 100 of a portion of a body of a person, which accounts for alight field of the image.

The method outlined in this disclosure is implemented on a computerutilizing at least one processor and memory (or other non-transitorycomputer readable medium) associated with the computer. The memory maystore instructions and/or data to configure the at least one processorduring execution and hence the computer to provide and/or perform themethods described herein. The instructions may be configured as softwaresuch as a native application or browser-based application. The computermay be coupled for communication, whether locally such as via a bus orremotely such as via a network, to one or more storage devices, imageand/or video capturing devices (e.g. a camera) and other devices orservices (e.g. via the Web). One exemplary embodiment is the utilizationof a mobile device using either static images or a real-time live videofeed which is processed frame by frame. The mobile device may comprisethe camera. Another exemplary embodiment is a browser executing on acomputer which simulates makeup shades on static images or real-timelive video feed processed frame by frame. Another exemplary embodimentis an in store “magic” mirror which simulates makeup on a real-time livevideo feed processed frame by frame.

The proposed method could be employed in any number of color spaces(RGB, HSV, HSL, LAB, CMYK, etc). For the purposes of simplicity, thefollowing calculations are based on the HSV domain. However, it is notedthat anyone familiar with the art will be able to replicate theseequations in different color spaces.

The following derivations assume an RGB scale in the 0-255 range perchannel and an HSV scale with a 0-1 scale for S and V channel.

In this disclosure a reference to a color means the color for a singleregion which is determined by averaging the colors of that region. Aregion could be as small as a single pixel, but could consist of a groupof pixels constituting a single coloring region. A region on the imagewhich is to be colored with the new coloring layer has an average basecolor for the region defined by H for hue, S for saturation, and V forvalue.

With reference to FIG. 1, there is shown a flow chart showing a methodfor light field correction of colored surfaces in an image 100. Thereceived image 100 can be provided from a camera, storage, or otherimage source. The image may be a single image format or video format. At110, light field parameter estimation is performed. At 120, Visualrendering correction is performed, utilizing received effect information150. At 130, light field corrected rendering is performed on thereceived image with the effect and at 140 the corrected image with theeffect is displayed. Steps 110, 120, 130 in particular are describedfurther with respect to FIG. 2.

The received effect information 150 can be a makeup effect, a skineffect, or any other color effect. The received effect information 150can be provided by a user, storage or any other effect source.

With reference to FIG. 2 and in brief, the exemplary embodiment of thecorrection of the makeup or skin effect proceeds by the following steps:(1) feature detection 230 of the face and facial features of the images,(2) calculating the light field parameter estimation comprisingcalculating the light profile estimation 210 of the image, andcalculating the minimum light field estimation 220 of the image, (3)receiving the color effect 150 that is to be applied to the image, (4)applying a non-linear light field transformation 200 to the intensity ofthe color effect, (5) applying the non-linear light field transformationwith minimum light compensation 240 to the intensity of the coloreffect, (6) applying the saturation correction 250 of the color effect.(7) light field corrected rendering 130 of the received effect 150 onthe image 100 to generate a corrected image, and (8) displaying thecorrected image 140. In terms of FIG. 1, light field parameterestimation 110 is detailed as step 2 following preliminary processing ofstep 1 and visual correction rendering 120 is detailed as steps 4-6.

Step one in the exemplary embodiment is feature detection 230 of theface and facial features within the image. This can be accomplished bygradient-based methods, template-based methods, or other methods todetermine the specific location of the face and facial features such asthe eyes, nose, and lips. The skin regions of the face can then bedetected, from which the color of the skin could be determined byaveraging the pixels within the skin region.

Step two in the exemplary embodiment is the calculation of the lightfield parameter estimation 110, comprising the light profile estimation210 and the minimum light field estimation 220.

In the exemplary embodiment calculation of the light profile estimation210. This is determined by defining V_face 300 as the value of theaverage face color. V_face 300 could also be determined from otherintrinsic parameters of a photo in order to get a reading on thelighting of the environment. For example, V_face 300 could be determinedfrom the shine on the hair, by using the extreme of shine and shadow onthe hair to provide a method to calibrate the face color value V_face(e.g. compute V_face on a scale between the smallest V and largest V onthe hair and remap it to a normalized scale). V_face 300 could also beobtained using the average lighting in the background similarly by usingthe minimum and maximum values (or other statistical measures) tocalibrate the average skin pixels from which V_face is estimate. Infact, V_face could be determined through the calibration of any sourceof lighting measurement, including from the background, the hair, or theface, or a combination of any or all of the them.

In the exemplary embodiment the method assesses the low-light cameracontrast adjustments through the calculation of the minimum light fieldestimation 220. V_black 310 is defined as the lowest V value around theeyes (which is one method of estimating the minimum light value of theface). This is done by searching a region of pixels around the eyes,finding the pixel or region which has the smallest V value parameter anddefining that to be V_black 310. V_black 310 could also be defined asthe minimum V value around the face, or throughout the whole image aswell. It is a measure of the minimum V value which can be determined byvarious image and camera parameters by observing the minimum V valuewithin a region which is expected to contain a black color (expecting anideal V_black of 0, though in practice V_black may be higher than 0 dueto the lighting of the image/video frame). In fact, having a face orfacial features within the region is not a requirement, though knowledgeof the facial features (such as the black color of the lashes or theshadows in the nose provides useful target regions for estimatingV_black) is assistive.

Step three in the exemplary embodiment is receiving the effectinformation 150, which may be a makeup effect, skin effect, or othercolor effect that is to be applied to the image. The color of thiseffect that is intended to be rendered at the current region is definedas having a hue of H_original, a saturation of S_original, and a valueof V_original.

Step four of the exemplary embodiment is to apply a non-linear lightfield transformation 200 to the intensity of the color, calculated as ascaled value parameter defined below, which is used to calculate theadjusted intensity of the color, V_adjusted 320:V_adjusted=V_original*(1−V_original*c_1)

In the above equation, c_1 is a value distortion correcting constantfactor in the 0-1 range. A preferred value of c_1 is in the 0.4 to 0.9range. This adjustment is applied since the color that is intended to berendered is usually parameterized in a brighter setting than thelighting conditions where the image is captured.

Step five of the exemplary embodiment is to apply a non-linear lightfield transformation with minimum light compensation 240 to calculatethe new intensity of the color to be rendered on the image. The color isadjusted to correct any low-light contrast issues in the image or videoframe. V_new 330 is calculated based on the following non-linear set ofequations:if (V_face>V_black)&&(c_2>V_black)&&(V_adjusted>V_black)V_new=(V_adjusted−V_black)*(V_face−V_black)/(c_2−V_black)+V_blackelseV_new=V_black

In the above equations, c_2 is a base value limit in the 0-1 range. Apreferred value of c_2 is in the 0.3 to 0.8 range. The non-lineartransformations defined above include the V_black 310 minimum lightvalue parameter. This provides a unique distinction with other coloradjustment methods such as the one disclosed in U.S. Pat. No. 9,449,412,which neither utilizes a non-linear light value transformation norestimates the minimum light value parameter which is critical in thenon-linear light-value transformation.

Step six of the exemplary embodiment is to apply the saturationcorrection 250 to the saturation value of the received effectinformation 150, as the saturation of the received color effect 150 canalso be affected by the light field. In the exemplary embodiment this isa non-linear transformation accounting for minimum light. The correctedsaturation value S_new 340 is calculated using the following equation:S_new=S_original*max(0,1−V_black/c_3)

In the above equation, c_3 is a saturation compensation scaling value inthe 0-1 range. A preferred value of c_3 is in the 0.4 to 1.0 range.

The corrected color value that is rendered on the image is defined byH_original, S_new 340, and V_new 330.

Step seven of the exemplary embodiment is the light field correctedrendering 130 of the received effect information 150 on the image 100.This is accomplished by replacing the original H, S, and V of the pixelsin the current region of the image with the corrected color valuesH_original, S_new 340, and V_new 340, respectively. Again, a regioncould be as small as a pixel, or could be a group of pixels whoseaverage H, S, and V values would be replaced by H_original, S_new 340,and V_new 330. Further enhancements could be obtained by a more complexlighting model for H, S, and V, including how each of these are affectedby lighting.

This process is then repeated for all other regions of the receivedimage 100 where a received color effect 150 is to be applied.

The color in one or more regions of the image 100 is replaced by thecorrected coloring value, thereby creating a corrected image. Thiscorrected image can be stored in computer memory and/or displayed 140 tothe user via a screen or display. If the corrected image is a videoframe, the resulting video frame can be displayed 140 and/or stored aspart of a group of video frames.

It should be apparent to those skilled in the art that the descriptionand Figures are merely illustrative and not limiting. They are presentedby way of example only. Modifications and other embodiments are withinthe scope of one of ordinary skill in the art and are contemplated asfalling within the claimed subject matter.

What is claimed is:
 1. A computer-implemented method for correcting amakeup or skin effect to be rendered on a surface region of an image ofa portion of a body of a person, which accounts for a light field of theimage, the method comprising: calculating a light intensity estimationof the image as an average light intensity of pixels in a first regionof the image; determining a minimum light field estimation of the imageas a minimum light intensity of pixels in a second region of the image;receiving color effect parameters of the makeup or skin effect;correcting the color effect parameters through a non-lineartransformation accounting for the light intensity estimation and theminimum light field estimate to generate a light field corrected makeupor skin effect; rendering the light field corrected makeup or skineffect on the surface region to generate a corrected image; anddisplaying the corrected image; and wherein correcting the color effectparameters comprises: applying a non-linear light field transformationto an intensity parameter of the color effect parameters, using a scaledvalue to determine an adjusted value of an original value of theintensity parameter; applying a non-linear light field transformationresponsive to the light intensity estimation, the minimum light fieldestimation and the adjusted value to determine a new value to use forthe intensity parameter; and applying a saturation correction to asaturation parameter of the color effect parameters, where thesaturation correction is a non-linear transformation responsive to theminimum light field estimation.
 2. The method of claim 1 wherein theimage is a video frame.
 3. The method of claim 1 wherein the portion ofthe body of the person includes a face.
 4. The method of claim 3 whereinthe first region of the image comprises a face region of the person. 5.The method of claim 3 wherein the second region of the image comprisesan eye region of the person.
 6. The method of claim 1, furthercomprising performing feature detection within the image to determinethe first region and the second region.
 7. The method of claim 1wherein: the light intensity estimation for the first region is definedas V_1^(st)region; the minimum light filed estimation for the secondregion is defined as V_black; the adjusted value of the intensityparameter is defined as V_adjusted; and the new value to use for theintensity parameter is defined as V_New in accordance with a definition:if (V_1^(st)region>V_black)&&(c_2>V_black)&&(V_adjusted>V_black)V_new=(V_adjusted−V_black)*(V_1^(st)region−V_black)/(c_2−V_black)+V_black;elseV_new=V_black where c_2 is a base value limit in a 0-1 range.
 8. Themethod of claim 1, wherein the minimum light filed estimation for thesecond region is defined as V_black and the saturation correctiondefines a new saturation value S_New for an original value S_Original ofthe saturation parameter in accordance with a definition:S_new=S_original*max(0,1−V_black/c_3); where c_3 is a saturationcompensation scaling value in a 0-1 range.
 9. The method of claim 1wherein the second region of the image is an eye region and the step ofdetermining a minimum light field estimation of the image comprisessearching around the eye region to find a pixel or region of pixelswhich has a smallest light intensity value with which to define theminimum light field estimation.
 10. A computer system for correcting amakeup or skin effect to be rendered on a surface region of an image ofa portion of a body of a person, which accounts for a light field of theimage, the system comprising at least one processor coupled to memorystoring instructions and data, which when executed by the processor,cause the computer system to: calculate a light intensity estimation ofthe image as an average light intensity of pixels in a first region ofthe image; determine a minimum light field estimation of the image as aminimum light intensity of pixels in a second region of the image;receive color effect parameters of the makeup or skin effect; correctthe color effect parameters of the makeup or skin effect through anon-linear transformation accounting for the light intensity estimationand the minimum light field estimation to generate a light fieldcorrected makeup or skin effect; render the light field corrected makeupor skin effect on the surface region to generate a corrected image; anddisplay the corrected image; and wherein to correct the color effectparameters comprises: applying a non-linear light field transformationto an intensity parameter of the color effect parameters, using a scaledvalue to determine an adjusted value of an original value of theintensity parameter; applying a non-linear light field transformationresponsive to the light intensity estimation, the minimum light fieldestimation and the adjusted value to determine a new value to use forthe intensity parameter; and applying a saturation correction to asaturation parameter of the color effect parameters, where thesaturation correction is a non-linear transformation responsive to theminimum light field estimation.
 11. The system of claim 10 wherein theimage is a video frame.
 12. The system of claim 10 wherein the portionof the body of the person includes a face.
 13. The system of claim 12wherein the first region of the image comprises a face region of theperson.
 14. The system of claim 12 wherein the second region of theimage comprises an eye region of the person.
 15. The system of claim 10,wherein the instructions, when executed by the processor, cause thecomputer system to further perform feature detection within the image todetermine the first region and the second region.
 16. The system ofclaim 10 wherein: the light intensity estimation for the first region isdefined as V_1^(st)_region; the minimum light filed estimation for thesecond region is defined as V_black; the adjusted value of the intensityparameter is defined as V_adjusted; and the new value to use for theintensity parameter is defined as V_New in accordance with a definition:if (V_1^(st)_region>V_black)&&(c_2>V_black)&&(V_adjusted>V_black)V_new=(V_adjusted−V_black)*(V_1^(st)_region−V_black)/(c_2−V_black)+V_black;elseV_new=V_black where c_2 is a base value limit in a 0-1 range.
 17. Thesystem of claim 10, wherein the minimum light filed estimation for thesecond region is defined as V_black and the saturation correctiondefines a new saturation value S_New for an original value S_Original ofthe saturation parameter in accordance with a definition:S_new=S_original*max(0,1−V_black/c_3); where c_3 is a saturationcompensation scaling value in a 0-1 range.
 18. The system of claim 10wherein the second region of the image is an eye region and to determinethe minimum light field estimation of the image comprises searchingaround the eye region to find a pixel or region of pixels which has asmallest light intensity value with which to define the minimum lightfield estimation.
 19. A non-transitory computer readable medium storinginstructions that, when executed by a processor of a computer, cause thecomputer to carry out the following: calculating a light intensityestimation of an image of a portion of a body of a person as an averagelight intensity of pixels in a first region of the image; determining aminimum light field estimation of the image as a minimum light intensityof pixels in a second region of the image; receiving color effectparameters of a makeup or skin effect; correcting the color effectparameters through a non-linear transformation accounting for the lightintensity estimation and the minimum light field estimate to generate alight field corrected makeup or skin effect; rendering the light fieldcorrected makeup or skin effect on a surface region of the portion ofthe body to generate a corrected image; and displaying the correctedimage; and wherein correcting the color effect parameters comprises:applying a non-linear light field transformation to an intensityparameter of the color effect parameters using a scaled value todetermine an adjusted value of an original value of the intensityparameter; applying a non-linear light field transformation responsiveto the light intensity estimation, the minimum light field estimationand the adjusted value to determine a new value to use for the intensityparameter; and applying a saturation correction to a saturationparameter of the color effect parameters where the saturation correctionis a non-linear transformation responsive to the minimum light fieldestimation.
 20. The non-transitory computer readable medium of claim 19,wherein the instructions, when executed by the processor, cause thecomputer to further perform feature detection within the image todetermine the first region and the second region.
 21. The non-transitorycomputer readable medium of claim 19, wherein the first region of theimage comprises a face region of the person and the second regioncomprises a facial feature region within the face region.
 22. Thenon-transitory computer readable medium of claim 19 wherein: the lightintensity estimation for the first region is defined as V_1^(st)_region;the minimum light filed estimation for the second region is defined asV_black; the adjusted value of the intensity parameter is defined asV_adjusted; and the new value to use for the intensity parameter isdefined as V_New in accordance with a definition:if (V_1^(st)_region>V_black)&&(c_2>V_black)&&(V_adjusted>V_black)V_new=(V_adjusted−V_black)*(V_1^(st)_region−V_black)/(c_2−V_black)+V_black;elseV_new=V_black where c_2 is a base value limit in a 0-1 range.
 23. Thenon-transitory computer readable medium of claim 19, wherein the minimumlight filed estimation for the second region is defined as V_black andthe saturation correction defines a new saturation value S_New for anoriginal value S_Original of the saturation parameter in accordance witha definition:S_new=S_original*max(0,1−V_black/c_3); where c_3 is a saturationcompensation scaling value in a 0-1 range.
 24. The non-transitorycomputer readable medium of claim 19, wherein the second region of theimage is an eye region and wherein determining the minimum light fieldestimation of the image comprises searching around the eye region tofind a pixel or region of pixels which has a smallest light intensityvalue with which to define the minimum light field estimation.